currentHome=$(cd "$(dirname "$0")";pwd)
order_rpm_files=("mysql-community-common-[0-9]{1}\." "mysql-community-client-plugins-[0-9]{1}\.")
for f in ${order_rpm_files[@]}
do
  echo $f
done

for database in `ls ${currentHome}/append`
do
  for table in `ls ${currentHome}/append/${database}`
  do
    echo $database${table}
  done
done


assets=("assetssystem" "assetstype" "assets" "dept" "location")
if [[ $# -gt 0 ]]
then
  unset assets
  assets=$@
fi
declare -A myMap
myMap["assetssystem"]="t_assets_system"
myMap["assetstype"]="t_assetstype"
myMap["assets"]="t_assets"
myMap["location"]="t_location"
for item in ${assets[@]}
do
  echo 'use nanshan;delete from t_relatin_thingboard where source_id in (select id from '"${myMap[$item]}"');'
  echo '8700/nanshan/'"${item}"'/list/syn'
done
